<?php
/* @var $this AnggotaController */
/* @var $model Anggota */
/* @var $form CActiveForm */
?>
<script>
	function save(){
	    
	}
</script>
<div id="steps">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'anggota-form',
	'enableAjaxValidation'=>false,
)); ?>
<fieldset class="step">

	<p>
		<?php echo $form->label($model,'NAMA'); ?>
		<?php echo $form->textField($model,'NAMA',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'NAMA'); ?>
	</p>

	<p>
		<label for="Anggota[TANGGAL_MASUK]">Tanggal Masuk</label>
		<?php //echo $form->dateField($model,'TANGGAL_TRANSAKSI'); 
			$this->widget('zii.widgets.jui.CJuiDatePicker', array(
			 'name'=>"Anggota[TANGGAL_MASUK]", // the name of the field
			 'value'=>($model->TANGGAL_MASUK!=null)?(date("d-m-Y", strtotime($model->TANGGAL_MASUK))):(date('d-m-Y')),  // pre-fill the value
			 // additional javascript options for the date picker plugin
			 'options'=>array(
							 'showAnim'=>'fold',
							 'dateFormat'=>'dd-mm-yy',  // optional Date formatting
							 'debug'=>true,
							 'changeYear'=> true,
							 'changeMonth'=>true
						),
			 'htmlOptions'=>array(
			 'style'=>'height:17px;'
			 ),
			 ));
		?>
		<?php echo $form->error($model,'TANGGAL_MASUK'); ?>
	</p>

	<p>
		<?php echo $form->label($model,'ALAMAT'); ?>
		<?php echo $form->textField($model,'ALAMAT',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'ALAMAT'); ?>
	</p>

	<p>
		<?php echo $form->label($model,'TELEPHONE'); ?>
		<?php echo $form->textField($model,'TELEPHONE',array('size'=>35,'maxlength'=>35)); ?>
		<?php echo $form->error($model,'TELEPHONE'); ?>
	</p>
	
	<p>
		<?php echo $form->labelEx($model,'STATUS_PEGAWAI'); ?>
		<?php echo $form->DropDownList($model,'STATUS_PEGAWAI',CHtml::listData(StatusPegawai::model()->findAll(),'ID_STATUS_PEGAWAI','STATUS')); ?>
		<?php echo $form->error($model,'STATUS_PEGAWAI'); ?>
	</p>
	
	<?php 
	$simpanan = JenisSimpanan::model()->find('ID_SIMPANAN = 1');
	?>
	
	<p class="submit">
		<button id="registerButton" type="submit">Simpan</button>&nbsp;
		<button id="registerButton" type="reset">Reset</button>&nbsp;
		<button id="registerButton" type="button" onclick="window.location.href='<?php echo Yii::app()->createUrl("Anggota");?>'">Kembali</button>
	</p>
	</fieldset>
<!-- form -->
<?php $this->endWidget(); ?>
</div>